home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 018 / mc68010 / chop.bas next >
BASIC Source File  |  1995-03-17  |  739b  |  25 lines

  1. 10    '+
  2. 20    '    Program to chop off the end of files that Xmodem padded;
  3. 30    '-
  4. 40    '
  5. 50    input% = 1
  6. 60    output% = 2
  7. 65    count% = 0
  8. 70    legalchars$ = chr$(9) + chr$(10) + chr$(13)
  9. 100   input "Input file ";infile$
  10. 110   input "Output file ";outfile$
  11. 115   input "number of bytes to copy";total%
  12. 120   open "i", #input%, infile$
  13. 130   open "o", #output%, outfile$
  14. 200   if eof(input%) then goto 990
  15. 201   if (count% = total%) then goto 990
  16. 210   get #input%, char$
  17. 220   print #output%, using "&"; char$;
  18. 221   count% = count% + 1
  19. 222   if ( (count% mod 1024) = 0 ) then print ".";
  20. 223   if ( (count% mod (10*1024) ) = 0 ) then print
  21. 500   goto 200
  22. 990   close #input%
  23. 991   close #output%
  24. 999   end
  25.